package com.wwmz.pattern.singleton.thread;

import com.wwmz.pattern.singleton.lazy.ExectorThread;

/**
 * Created by wumz on 2020/9/17 15:25
 */
public class ThreadLocalTest {
    public static void main(String[] args) {
        System.out.println(ThreadLocalSingleton.getInstance());
        System.out.println(ThreadLocalSingleton.getInstance());
        System.out.println(ThreadLocalSingleton.getInstance());
        System.out.println(ThreadLocalSingleton.getInstance());

        Thread thread1 = new Thread(new ExectorThread());
        Thread thread2 = new Thread(new ExectorThread());

        thread1.start();
        thread2.start();
        System.out.println("End");

    }
}
